import Vue from 'vue'
import App from './App'
import store from '@/store';
Vue.prototype.$store = store


//多语言
import messages from './locale/index'


let i18nConfig = {
  locale: uni.getLocale(),
  messages
}

import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
import configJs from "@/common/config.js";
uni.$config = configJs


// import * as filters from '@/common/filters.js';

// // 注入全局过滤器
// Object.keys(filters).forEach(key => {
// 	Vue.filter(key, filters[key])
//  })

// 引入路由
import {router,RouterMount} from './common/router.js';
Vue.use(router);
uni.$Router = router

// 引入uview
import uView from '@/uni_modules/uview-ui';
Vue.use(uView);





// 引入扩展方法
import '@/common/extend.js';

Vue.config.productionTip = false
App.mpType = 'app'


const app = new Vue({
	i18n,
	store,
    ...App
})

// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
import httpInterceptor from '@/apis/http.interceptor.js'
Vue.use(httpInterceptor, app)

// http接口API集中管理引入部分
import httpApi from '@/apis/http.api.js'
Vue.use(httpApi, app)

/**
 * 推送弹框
 */
import '@/components/APPPush/index.js'

app.$mount(); 